﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Brjostagjof_H4.Models;

namespace Brjostagjof_H4.Tests.Controllers
{
    class MockMonsterRepository : Brjostagjof_H4.Models.IMonsterRepository
    {
        List<Models.About> abouts = new List<Models.About>();


        
        internal void Add(Models.About a)
        {
            abouts.Add(a);
        }

        public int Count
        {
            get
            {
                return abouts.Count;
            }
        }


        public Models.About getAbout()
        {
            Models.About result = (from n in abouts
                                   where n.ID == 1
                                   select n).SingleOrDefault<Models.About>();

            return result;
        }

        public void updateAbout(Models.About newAbout, string user)
        {
            try
            {
                Models.About result = (from n in abouts
                                       where n.ID == 1
                                       select n).SingleOrDefault<Models.About>();

                result = newAbout;
                result.changed_by = user;
                result.date_changed = DateTime.Now;

            }
            catch (Exception e)
            {
                throw e;
            }
        }

         public void updateCategories(List<Category> cats) { }
         public void updatePharmacist(About newPhar, string user) { }
         public About getPharmacist() { return (new About()); }
         public void updateDonate(About newDon, String user) { }
         public About getDonate() { return (new About()); }
         public List<Entry> getNewsPreview(int howMany) { return (new List<Entry>()); }
         public Entry getNewsFromID(int id) { return (new Entry()); }
         public List<Entry> getArticleList(int cat) { return (new List<Entry>()); }
         public List<Category> getCategories() { return (new List<Category>()); }
         public int getCategoryID(string category) { return 1; }
         public string getCategoryName(int catID) { return ""; }
         public List<Entry> getArticlePreview(int howMany) { return (new List<Entry>()); }
         public Entry getEntryById(int id) { return (new Entry()); }
         public List<Entry> getXLatestNews(int number) { return (new List<Entry>()); }
         public List<Entry> getXLatestArticles(int number) { return (new List<Entry>()); }
         public List<Entry> getXLatestEntries(int number) { return (new List<Entry>()); }
         public List<Entry> getXLatestEntriesByID(int number, Guid ID) { return (new List<Entry>()); }
         public IEnumerable<aspnet_Membership> getProfiles() { return null; }
         public aspnet_Membership getProfileByUserName(string userName) { return null; }
         public string getUserNameByID(Guid? ID) { return ""; }
         public void updateProfile(aspnet_Membership p, string user) { }
         public ContactUs deleteContactUsData(int id) { return (new ContactUs()); }
         public ContactUs fetchContactUsById(int id) { return (new ContactUs()); }
         public IQueryable<ContactUs> fetchContactUsDataAll() { return null; }
         public IQueryable<ContactUs> fetchContactUsDataOld() { return null; }
         public void addEntry(EntryModel entry) { }
         public void updateEntry(Entry entry) { }
         public bool isUserRegistered(string userName) { return true; }
         public bool updateRole(string userName, string role) { return true; }
         public List<UserHandling> getUserEditList() { return new List<UserHandling>(); }
         public UserHandling getUserEditByUserName(string userName) { return new UserHandling(); }
         public void updateBan(string user, bool isActive) { }
         public Guid getUserIDByName(String name) { return new Guid(); }
         public Timeline getDataByUserID(Guid user) { return new Timeline(); }
         public void addTimelineData(Timeline t) { }
         public void addAdvertisement(AdsModels ads) { }
    }
}
